home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- organization: Intelligent Software Products, Inc.
- subject: v10i032: b+tree mgr patches for SCO Xenix and System V
- from: jbayer@ispi.UUCP (Jonathan Bayer)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 10, Issue 32
- Submitted-by: jbayer@ispi.UUCP (Jonathan Bayer)
- Archive-name: b+tree/Patch-for-unix
-
- These are the diffs necessary to make the b+tree package run on Xenix,
- and probably on any System V based system.
-
- The main problem was that the parameters to memcpy() were reversed, causing
- the key to NOT be copied into the database.
-
-
- JB
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: README.XENIX btdbmlib/diffs btlib/diffs utils/diffs
- # Wrapped by Jonathan Bayer@ispi on Sun Jan 21 14:00:53 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'README.XENIX' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README.XENIX'\"
- else
- echo shar: Extracting \"'README.XENIX'\" \(241 characters\)
- sed "s/^X//" >'README.XENIX' <<'END_OF_FILE'
- X
- XThese are the diffs necessary to make the b+tree package run on Xenix,
- Xand probably on any System V based system.
- X
- XThe main problem was that the parameters to memcpy() were reversed, causing
- Xthe key to NOT be copied into the database.
- X
- X
- XJB
- END_OF_FILE
- if test 241 -ne `wc -c <'README.XENIX'`; then
- echo shar: \"'README.XENIX'\" unpacked with wrong size!
- fi
- # end of 'README.XENIX'
- fi
- if test -f 'btdbmlib/diffs' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'btdbmlib/diffs'\"
- else
- echo shar: Extracting \"'btdbmlib/diffs'\" \(1104 characters\)
- sed "s/^X//" >'btdbmlib/diffs' <<'END_OF_FILE'
- X*** orig/Makefile Sun Jan 21 12:34:01 1990
- X--- Makefile Sat Jan 20 20:23:17 1990
- X***************
- X*** 34,40 ****
- X CFILES= btdbmclose.c \
- X btdbmdelete.c \
- X btdbmfetch.c \
- X! btdbmfirstkey.c \
- X btdbmnextkey.c \
- X btdbmopen.c \
- X btdbmstore.c \
- X--- 34,40 ----
- X CFILES= btdbmclose.c \
- X btdbmdelete.c \
- X btdbmfetch.c \
- X! btdbmfrstkey.c \
- X btdbmnextkey.c \
- X btdbmopen.c \
- X btdbmstore.c \
- X***************
- X*** 65,71 ****
- X OFILES= btdbmclose.o \
- X btdbmdelete.o \
- X btdbmfetch.o \
- X! btdbmfirstkey.o \
- X btdbmnextkey.o \
- X btdbmopen.o \
- X btdbmstore.o \
- X--- 65,71 ----
- X OFILES= btdbmclose.o \
- X btdbmdelete.o \
- X btdbmfetch.o \
- X! btdbmfrstkey.o \
- X btdbmnextkey.o \
- X btdbmopen.o \
- X btdbmstore.o \
- X*** orig/btdbmfirstkey. Sun Jan 21 12:33:47 1990
- X--- btdbmfrstkey.c Sat Jan 20 10:15:56 1990
- X***************
- X*** 35,37 ****
- X--- 35,38 ----
- X ret = btdbm_nextkey(db);
- X return(ret);
- X }
- X+
- X*** orig/stoconf.h Sun Jan 21 12:33:50 1990
- X--- stoconf.h Sat Jan 20 20:20:59 1990
- X***************
- X*** 40,42 ****
- X--- 40,44 ----
- X
- X #define _DEF_STO_CONF_H
- X #endif
- X+
- X+ #include <fcntl.h>
- END_OF_FILE
- if test 1104 -ne `wc -c <'btdbmlib/diffs'`; then
- echo shar: \"'btdbmlib/diffs'\" unpacked with wrong size!
- fi
- # end of 'btdbmlib/diffs'
- fi
- if test -f 'btlib/diffs' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'btlib/diffs'\"
- else
- echo shar: Extracting \"'btlib/diffs'\" \(2637 characters\)
- sed "s/^X//" >'btlib/diffs' <<'END_OF_FILE'
- X*** orig/btconf.h Sun Jan 21 12:34:04 1990
- X--- btconf.h Sat Jan 20 20:29:47 1990
- X***************
- X*** 65,85 ****
- X /*
- X choose one of these as your favorite memory copying function
- X can you believe 3 functions, 3 names, all do the same thing ?
- X-
- X- #define USE_MEMCPY 1
- X- #define USE_MOVEMEM 1
- X */
- X! #define USE_BCOPY 1
- X
- X /*
- X if the operating system the software will be running under supports
- X the ftruncate(2) system call to free a file's allocated space after
- X a certain length, turn this option on, and bt_zap() will free extra
- X space when called.
- X- #define USE_FTRUNCATE 0
- X */
- X! #define USE_FTRUNCATE 1
- X
- X /*
- X the default page size. usually use BUFSIZ or maybe (BUFSIZ * 2)
- X considerations are:: as buffer size increases, memory use for
- X--- 65,86 ----
- X /*
- X choose one of these as your favorite memory copying function
- X can you believe 3 functions, 3 names, all do the same thing ?
- X */
- X! #define USE_MEMCPY 1
- X! /* #define USE_MOVEMEM 1 */
- X
- X+ /* #define USE_BCOPY 1 */
- X+
- X /*
- X if the operating system the software will be running under supports
- X the ftruncate(2) system call to free a file's allocated space after
- X a certain length, turn this option on, and bt_zap() will free extra
- X space when called.
- X */
- X! /* #define USE_FTRUNCATE 0
- X
- X+ /* #define USE_FTRUNCATE 1 */
- X+
- X /*
- X the default page size. usually use BUFSIZ or maybe (BUFSIZ * 2)
- X considerations are:: as buffer size increases, memory use for
- X***************
- X*** 140,142 ****
- X--- 141,146 ----
- X
- X #define _DEF_BT_CONFIG_H
- X #endif
- X+
- X+ #define u_long long
- X+ #include <fcntl.h>
- X*** orig/btinsert.c Sun Jan 21 12:34:08 1990
- X--- btinsert.c Sun Jan 21 12:27:52 1990
- X***************
- X*** 71,77 ****
- X (void)bcopy((char *)key,(char *)kp1,len);
- X #endif
- X #ifdef USE_MEMCPY
- X! (void)memcpy((char *)key,(char *)kp1,len);
- X #endif
- X #ifdef USE_MOVEMEM
- X (void)movemem((char *)key,(char *)kp1,len);
- X--- 71,77 ----
- X (void)bcopy((char *)key,(char *)kp1,len);
- X #endif
- X #ifdef USE_MEMCPY
- X! (void)memcpy((char *)kp1,(char *)key,len);
- X #endif
- X #ifdef USE_MOVEMEM
- X (void)movemem((char *)key,(char *)kp1,len);
- X*** orig/btpage2.c Sun Jan 21 12:34:12 1990
- X--- btpage2.c Sun Jan 21 12:28:22 1990
- X***************
- X*** 152,158 ****
- X (void)bcopy((char *)cp,(char *)dbuf,*dlen);
- X #endif
- X #ifdef USE_MEMCPY
- X! (void)memcpy((char *)cp,(char *)dbuf,*dlen);
- X #endif
- X #ifdef USE_MOVEMEM
- X (void)movemem((char *)cp,(char *)dbuf,*dlen);
- X--- 152,158 ----
- X (void)bcopy((char *)cp,(char *)dbuf,*dlen);
- X #endif
- X #ifdef USE_MEMCPY
- X! (void)memcpy((char *)dbuf,(char *)cp,*dlen);
- X #endif
- X #ifdef USE_MOVEMEM
- X (void)movemem((char *)cp,(char *)dbuf,*dlen);
- END_OF_FILE
- if test 2637 -ne `wc -c <'btlib/diffs'`; then
- echo shar: \"'btlib/diffs'\" unpacked with wrong size!
- fi
- # end of 'btlib/diffs'
- fi
- if test -f 'utils/diffs' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'utils/diffs'\"
- else
- echo shar: Extracting \"'utils/diffs'\" \(2305 characters\)
- sed "s/^X//" >'utils/diffs' <<'END_OF_FILE'
- X*** orig/btest.c Sun Jan 21 12:34:21 1990
- X--- btest.c Sat Jan 20 20:31:52 1990
- X***************
- X*** 42,47 ****
- X--- 42,51 ----
- X #include "btconf.h"
- X #include "btintern.h"
- X
- X+ #ifdef M_XENIX
- X+ #define rindex strrchr
- X+ #endif
- X+
- X #ifndef lint
- X static char *rcsid = "$Header: /atreus/mjr/hacks/btree/utils/RCS/btest.c,v 1.1 89/10/24 10:09:28 mjr Rel $";
- X #endif
- X*** orig/btoptim.c Sun Jan 21 12:34:07 1990
- X--- btoptim.c Sun Jan 21 01:40:57 1990
- X***************
- X*** 2,7 ****
- X--- 2,8 ----
- X #include <ctype.h>
- X #include <sys/types.h>
- X #include <sys/file.h>
- X+ #include <fcntl.h>
- X #include "btree.h"
- X
- X /*
- X*** orig/dbtest.c Sun Jan 21 12:34:11 1990
- X--- dbtest.c Sat Jan 20 20:34:06 1990
- X***************
- X*** 2,7 ****
- X--- 2,8 ----
- X #include <ctype.h>
- X #include <sys/types.h>
- X #include <sys/file.h>
- X+ #include <fcntl.h>
- X #include "btdbm.h"
- X
- X /*
- X*** orig/rectest.c Sun Jan 21 12:34:14 1990
- X--- rectest.c Sat Jan 20 20:32:40 1990
- X***************
- X*** 2,7 ****
- X--- 2,8 ----
- X #include <ctype.h>
- X #include <sys/types.h>
- X #include <sys/file.h>
- X+ #include <fcntl.h>
- X #include "store.h"
- X
- X /*
- X*** orig/testrack.c Sun Jan 21 12:34:15 1990
- X--- testrack.c Sun Jan 21 12:25:11 1990
- X***************
- X*** 1,6 ****
- X #include <stdio.h>
- X- #include <sys/file.h>
- X #include <sys/types.h>
- X #include "btree.h"
- X
- X /*
- X--- 1,7 ----
- X #include <stdio.h>
- X #include <sys/types.h>
- X+ #include <sys/file.h>
- X+ #include <fcntl.h>
- X #include "btree.h"
- X
- X /*
- X***************
- X*** 13,19 ****
- X distributed in accordance with the terms listed in
- X the COPYRIGHT document.
- X */
- X!
- X
- X #ifndef lint
- X static char *rcsid = "$Header: /atreus/mjr/hacks/btree/utils/RCS/testrack.c,v 1.1 89/10/24 10:09:25 mjr Rel $";
- X--- 14,22 ----
- X distributed in accordance with the terms listed in
- X the COPYRIGHT document.
- X */
- X! #ifdef M_XENIX
- X! #define index strchr
- X! #endif
- X
- X #ifndef lint
- X static char *rcsid = "$Header: /atreus/mjr/hacks/btree/utils/RCS/testrack.c,v 1.1 89/10/24 10:09:25 mjr Rel $";
- X*** orig/words.c Sun Jan 21 12:33:59 1990
- X--- words.c Sun Jan 21 01:40:30 1990
- X***************
- X*** 11,16 ****
- X--- 11,21 ----
- X the COPYRIGHT document.
- X */
- X
- X+ #ifdef M_XENIX
- X+ #define random rand
- X+ #define srandom srand
- X+ #endif
- X+
- X
- X extern long random();
- X extern long time();
- END_OF_FILE
- if test 2305 -ne `wc -c <'utils/diffs'`; then
- echo shar: \"'utils/diffs'\" unpacked with wrong size!
- fi
- # end of 'utils/diffs'
- fi
- echo shar: End of shell archive.
- exit 0
- --
- Jonathan Bayer Intelligent Software Products, Inc.
- (201) 245-5922 500 Oakwood Ave.
- jbayer@ispi.COM Roselle Park, NJ 07204
-
-